
package com.net.shop.car.manager.api.volley.request;

import org.json.JSONException;
import org.json.JSONObject;

import com.net.shop.car.manager.api.volley.Request;
import com.net.shop.car.manager.utils.Constants;
import com.net.shop.car.manager.utils.Constants.ServiceType;
import com.net.shop.car.manager.utils.LogUtils;

/**
 * 请使用SellerInfoResponse作响应
 * Deve
 *
 */
public class GetSellerInfo extends Request {

	private final ServiceType serviceType;
	private final String sellerId;
	
	
	
	/**
	 * @param type
	 * @param serviceType
	 * @param sellerId
	 */
	public GetSellerInfo(ServiceType serviceType, String sellerId) {
		super(Constants.SELLER_INFO);
		this.serviceType = serviceType;
		this.sellerId = sellerId;
	}

	/* (non-Javadoc)
	 * @see com.net.shop.car.manager.api.volley.Request#extensionJSON(org.json.JSONObject)
	 */
	@Override
	public void extensionJSON(JSONObject jsonObject) {
		try {
			jsonObject.put("dic_type", serviceType.description);
			jsonObject.put("sellerid", sellerId);
		} catch (JSONException e) {
			LogUtils.e(e.getMessage());
		}
	}

}
